<template>
	<div class="feedback-details">
		<top-header title="反馈详情" />
		<div class="feedback-details-content">
			<feedback-detail-card v-if="Object.keys(list).length !== 0" :status="is_answer" :list="list" />
		</div>
	</div>
</template>

<script>
import TopHeader from '@/components/TopHeader';
import FeedbackDetailCard from '../component/FeedbackDetailCard';

export default {
	name: 'index',
	components: {
		TopHeader,
		FeedbackDetailCard,
	},
	data() {
		return {
			is_answer: '', //回复状态
			question_id: '', //问题id
			list: {} , //详情数据
		};
	},
	mounted() {
		this.is_answer = Number(this.$route.query.is_answer);
		this.question_id = this.$route.query.question_id;
		this.getProblemDetails(this.question_id);
	},
	methods: {
		getProblemDetails(question_id) { //获取反馈详情
			_api.api_userPortal_sysQuestion_getById({
				sys_question_id: question_id,
			}).then(res => {
				this.list = res.data;
			}).catch(error => {
				console.log(error);
			})
		}
	},
};
</script>

<style lang="scss" scoped>
.feedback-details-content {
	border-top: 0.024155rem solid #e8e8e8;
	padding-top: 0.193237rem;
}
.feedback-details-content:last-child {
  margin-bottom: .531401rem;
}
</style>
